# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Roman Kyrylych <roman@archlinux.org>
# Contributor: Ben <ben@benmazer.net>

pkgname=gtkspell3
pkgver=3.0.10
pkgrel=2
url="http://gtkspell.sourceforge.net/"
pkgdesc="Provides word-processor-style highlighting and replacement of misspelled words in a GtkTextView widget"
arch=('loong64' 'x86_64')
license=('GPL')
depends=('gtk3' 'enchant')
makedepends=('intltool' 'gobject-introspection' 'vala')
source=(https://downloads.sourceforge.net/gtkspell/$pkgname-$pkgver.tar.xz)
sha256sums=('b040f63836b347eb344f5542443dc254621805072f7141d49c067ecb5a375732')

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr

  #https://bugzilla.gnome.org/show_bug.cgi?id=656231
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool

  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}
